<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>src.output.plot.Plot</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="src-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >ttrq4fleet - Petrina Papazek</th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="src-module.html">Package&nbsp;src</a> ::
        <a href="src.output-module.html">Package&nbsp;output</a> ::
        <a href="src.output.plot-module.html">Module&nbsp;plot</a> ::
        Class&nbsp;Plot
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="src.output.plot.Plot-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Plot</h1><p class="nomargin-top"><span class="codelink"><a href="src.output.plot-pysrc.html#Plot">source&nbsp;code</a></span></p>
<center>
<center>  <map id="uml_class_diagram_for_src_outp_3" name="uml_class_diagram_for_src_outp_3">
<area shape="rect" href="src.output.plot.Plot-class.html#__init__" title="x.__init__(...) initializes x; see x.__class__.__doc__ for signature" alt="" coords="17,36,471,55"/>
<area shape="rect" href="src.output.plot.Plot-class.html#create_new_plot" title="Creates a new figure with a grid and the given titles." alt="" coords="17,55,471,73"/>
<area shape="rect" href="src.output.plot.Plot-class.html#save_plot2png" title="Tries to export the current chart to png." alt="" coords="17,73,471,92"/>
<area shape="rect" href="src.output.plot.Plot-class.html#plot" title="plots the given values in a 2D&#45;plot" alt="" coords="17,92,471,111"/>
<area shape="rect" href="src.output.plot.Plot-class.html#plot_date" title="similar to plot but with a datetime x&#45;axis." alt="" coords="17,111,471,129"/>
<area shape="rect" href="src.output.plot.Plot-class.html" title="Class for managing the plots (used by other classes such as Indicator)." alt="" coords="16,11,472,131"/>
</map>
  <img src="uml_class_diagram_for_src_outp_3.gif" alt='' usemap="#uml_class_diagram_for_src_outp_3" ismap="ismap" class="graph-without-title" />
</center>
</center>
<hr />
<p>Class for managing the plots (used by other classes such as 
  Indicator).</p>
  <p>The class uses pylab (--&gt; you might need to install it).</p>
  <p>In order to export to a *.png-File do the following:</p>
  <ul>
    <li>
      init Plot
    </li>
    <li>
      call create_new_plot()-method
    </li>
    <li>
      call plot()
    </li>
    <li>
      call save_plot2png() in order to export the plot
    </li>
  </ul>

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="src.output.plot.Plot-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">path</span>=<span class="summary-sig-default">'../output/'</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="src.output.plot-pysrc.html#Plot.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="src.output.plot.Plot-class.html#create_new_plot" class="summary-sig-name">create_new_plot</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">title</span>=<span class="summary-sig-default">''</span>,
        <span class="summary-sig-arg">xlabel</span>=<span class="summary-sig-default">''</span>,
        <span class="summary-sig-arg">ylabel</span>=<span class="summary-sig-default">''</span>)</span><br />
      Creates a new figure with a grid and the given titles.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="src.output.plot-pysrc.html#Plot.create_new_plot">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="src.output.plot.Plot-class.html#save_plot2png" class="summary-sig-name">save_plot2png</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">filename</span>,
        <span class="summary-sig-arg">ext</span>)</span><br />
      Tries to export the current chart to png.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="src.output.plot-pysrc.html#Plot.save_plot2png">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="src.output.plot.Plot-class.html#plot" class="summary-sig-name">plot</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">xvalues</span>,
        <span class="summary-sig-arg">yvalues</span>,
        <span class="summary-sig-arg">col</span>=<span class="summary-sig-default">'red'</span>,
        <span class="summary-sig-arg">mark</span>=<span class="summary-sig-default">'+'</span>,
        <span class="summary-sig-arg">markersize</span>=<span class="summary-sig-default">3</span>)</span><br />
      plots the given values in a 2D-plot</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="src.output.plot-pysrc.html#Plot.plot">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="src.output.plot.Plot-class.html#plot_date" class="summary-sig-name">plot_date</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">xvalues</span>,
        <span class="summary-sig-arg">yvalues</span>,
        <span class="summary-sig-arg">col</span>=<span class="summary-sig-default">'red'</span>,
        <span class="summary-sig-arg">mark</span>=<span class="summary-sig-default">'+'</span>,
        <span class="summary-sig-arg">markersize</span>=<span class="summary-sig-default">3</span>,
        <span class="summary-sig-arg">fmt</span>=<span class="summary-sig-default">None</span>)</span><br />
      similar to plot but with a datetime x-axis.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="src.output.plot-pysrc.html#Plot.plot_date">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__format__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__sizeof__</code>,
      <code>__str__</code>,
      <code>__subclasshook__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">path</span>=<span class="sig-default">'../output/'</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="src.output.plot-pysrc.html#Plot.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>path</code></strong> - directory (default: ../output/)</li>
    </ul></dd>
    <dt>Overrides:
        object.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="create_new_plot"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">create_new_plot</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">title</span>=<span class="sig-default">''</span>,
        <span class="sig-arg">xlabel</span>=<span class="sig-default">''</span>,
        <span class="sig-arg">ylabel</span>=<span class="sig-default">''</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="src.output.plot-pysrc.html#Plot.create_new_plot">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Creates a new figure with a grid and the given titles.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>title</code></strong> - title of the plot (written on the top)</li>
        <li><strong class="pname"><code>xlabel</code></strong> - title of the x-axis (e.g. time)</li>
        <li><strong class="pname"><code>ylabel</code></strong> - title of the y-axis (e.g. speed)</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="save_plot2png"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">save_plot2png</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">filename</span>,
        <span class="sig-arg">ext</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="src.output.plot-pysrc.html#Plot.save_plot2png">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Tries to export the current chart to png.</p>
  <p>If the path is not valid or saving is for another reason not possible 
  a Plot_exception will be raised. The filepath is constructed from the 
  default directory path (@see path) and the filename (@see filename)</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="plot"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">plot</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">xvalues</span>,
        <span class="sig-arg">yvalues</span>,
        <span class="sig-arg">col</span>=<span class="sig-default">'red'</span>,
        <span class="sig-arg">mark</span>=<span class="sig-default">'+'</span>,
        <span class="sig-arg">markersize</span>=<span class="sig-default">3</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="src.output.plot-pysrc.html#Plot.plot">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>plots the given values in a 2D-plot</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>xvalues</code></strong> - list with x-values</li>
        <li><strong class="pname"><code>yvalues</code></strong> - list with y-values</li>
        <li><strong class="pname"><code>col</code></strong> - color of the line (default: red)</li>
        <li><strong class="pname"><code>mark</code></strong> - symbol of the marker (default: +)</li>
        <li><strong class="pname"><code>markersize</code></strong> - size of the marker (default: 3)</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="plot_date"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">plot_date</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">xvalues</span>,
        <span class="sig-arg">yvalues</span>,
        <span class="sig-arg">col</span>=<span class="sig-default">'red'</span>,
        <span class="sig-arg">mark</span>=<span class="sig-default">'+'</span>,
        <span class="sig-arg">markersize</span>=<span class="sig-default">3</span>,
        <span class="sig-arg">fmt</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="src.output.plot-pysrc.html#Plot.plot_date">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>similar to plot but with a datetime x-axis.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>xvalues</code></strong> - list with x-values</li>
        <li><strong class="pname"><code>yvalues</code></strong> - list with y-values</li>
        <li><strong class="pname"><code>col</code></strong> - color of the line (default: red)</li>
        <li><strong class="pname"><code>mark</code></strong> - symbol of the marker (default: +)</li>
        <li><strong class="pname"><code>markersize</code></strong> - size of the marker (default: 3)</li>
        <li><strong class="pname"><code>fmt</code></strong> - alternative marker attribute for pylab</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="src-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >ttrq4fleet - Petrina Papazek</th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Thu Oct 25 19:15:41 2012
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
